package flex.model
{
	import com.adobe.cairngorm.model.ModelLocator;
	
	import flex.vo.UserVO;
	
	import mx.collections.ArrayCollection;
	
	[Bindable]
	public class UserModelLocator implements ModelLocator
	{
		
		private static var userModelLocator:UserModelLocator;
		
		/*用来保存前台以及后台之间对象的传递，如登陆时传递的对象中只有userName和pwd两个属性，
			当登陆方法运行完以后，此对象保存的是数据库中此对象的所有的属性*/
		public var userVo:UserVO = new UserVO();
		
		public static function getInstance():UserModelLocator
		{
			if(userModelLocator == null)
			{
				userModelLocator = new UserModelLocator();
			}
			return userModelLocator;
		}
		
		public function UserModelLocator()
		{
			if(UserModelLocator.userModelLocator != null)
			{
				throw new Error("只能存在一个userModelLocator");
				trace("trace输出：只能存在一个userModelLocator");
			}
		}
	}
}